FROM python:3.7-buster
# FROM ubuntu:18.04
# ADD ./deploy/sources.list /etc/apt/sources.list
# RUN apt-get update \
#     && apt-get install -y libgfortran3 python3.7 python3-pip \
#     && rm -rf /var/lib/apt/lists/*
# RUN ln /usr/bin/python3.7 /usr/bin/python

RUN mkdir /workspace
WORKDIR /workspace

RUN apt-get update \
    && apt-get install -y ffmpeg \
    && rm -rf /var/lib/apt/lists/*


RUN python -m pip install gunicorn -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir

ADD requirements.txt /workspace
RUN python -m pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir

CMD sh run.sh